{% extends "bind/tmp/index_tmp.html" %}

{% block head %}
    <link rel="stylesheet" href="/static/AdminLTE/css/common.css">
    <script src="/static/AdminLTE/js/myjs.js"></script>
{% endblock %}


{% block content %}
    <!-- Modal 1 添加域名/修改域名 -->
    <div class="modal fade" id="DomainAddOrModifyModalLabel" action_type="add" tabindex="-20" role="dialog" aria-labelledby="DomainAddOrModifyModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">添加域名</h4>
                </div>

                <div class="modal-body">

                    <div class="form-horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">域名</label>
                            <div class="col-sm-10">
                                <input type="text" name="zone_name" class="form-control" placeholder="填写域名，例如：bindui.com或反向域：1.168.192.in-addr.arpa">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">SOA起始授权主机名</label>
                            <div class="col-sm-10">
                                <input type="text" name="data" class="form-control" placeholder="主机名(Primary name server)，后续创建相应的A记录，如：dns.bindui.com.">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">负责人邮箱</label>
                            <div class="col-sm-10">
                                <input type="text" name="mail" class="form-control"
                                       placeholder="用.代替@，如：dns-admin@bindui.com写作dns-admin.bindui.com.">
                            </div>
                        </div>
{# serial 字段已经由系统自动生成 #}
{#                        <div class="form-group">#}
{#                            <label class="col-sm-2 control-label">serial</label>#}
{#                            <div class="col-sm-10">#}
{#                                <input type="text" name="serial" class="form-control"#}
{#                                       placeholder="序列号,不超过10位数字,要比上一次的值大,为空时系统自动生成">#}
{#                            </div>#}
{#                        </div>#}

                        <div class="form-group">
                            <label class="col-sm-2 control-label">refresh(秒)</label>
                            <div class="col-sm-10">
                                <input type="text" name="refresh" value="900" class="form-control"
                                       placeholder="Slave DNS向Primary DNS同步间隔时间(秒)，如：900">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">retry(秒)</label>
                            <div class="col-sm-10">
                                <input type="text" name="retry" value="900" class="form-control"
                                       placeholder="Slave DNS向Primary DNS同步失败时重试时间，如：900">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">expire(秒)</label>
                            <div class="col-sm-10">
                                <input type="text" name="expire" value="2592000" class="form-control"
                                       placeholder="Slave DNS在无Master DNS情况下权威地提供解析服务时间，如：2592000">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">minimum(秒)</label>
                            <div class="col-sm-10">
                                <input type="text" name="minimum" value="600" class="form-control"
                                       placeholder="default TTL最小默认TTL值，如：600">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">primary ns</label>
                            <div class="col-sm-10">
                                <input type="text" name="primary_ns" class="form-control" placeholder="指定Slav DNS的Master DNS，如：dns.bindui.com.">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">备注</label>
                            <div class="col-sm-10">
                                <input type="text" name="comment" class="form-control" placeholder="可不填写">
                            </div>
                        </div>

                    </div>

                </div>

                <div class="modal-footer">
                    <button type="button" name="_save" class="btn btn-primary">保存</button>
                    <button type="button" name="_cancel" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>
    <!-- Modal 1 end -->

    <!-- Modal 2  删除domain -->
{#    <div class="modal fade" id="DomiandDeleteModalLabel" multiple="" tabindex="-10" role="dialog"#}
    <div class="modal fade" id="DomiandDeleteModalLabel" multiple="" tabindex="-10" role="dialog"
         aria-labelledby="DomiandDeleteModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="DomiandDeleteModalLabel">删除域名</h4>
                </div>
                <div class="modal-body">
                    <table class="ui-popmsg">
                        <tbody>
                        <tr>
                            <td height="72" class="i"><i class="b-error-icon"></i></td>
                            <td height="72" class="t"><span class="info">
                                <span class="tit">
                                    <span class="glyphicon glyphicon-warning-sign red"></span>确定删除所选择的域名吗？
                                </span>
                                <p>删除后，该域名下的所有记录将被删除！</p></span>
                            </td>
                        </tr>
                        </tbody>
                    </table>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" name="_delete_ok">确定</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal 2-->

    <!-- Modal 3 修改domain状态值 -->
    <div class="modal fade" id="DomainStatusModalLabel" multiple="" name="" tabindex="-30" role="dialog"
         aria-labelledby="DomainStatusModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="DomainStatusModalLabel">域名状态操作</h4>
                </div>
                <div class="modal-body">
                    <table class="ui-popmsg">
                        <tbody>
                        <tr>
                            <td height="72" class="i"><i class="b-error-icon"></i></td>
                            <td height="72" class="t"><span class="info"></span><span class="tit"></span></td>
                        </tr>
                        </tbody>
                    </table>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" name="_modify_status_ok">确定</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal 3-->

    <div class="col-xs-12"><h2>域名列表</h2></div>


    <div class="col-xs-12">
        <h3><button type="button" name="add_domain" class="btn btn-success">添加域名</button></h3>
    </div>
    <div>
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <h2 class="box-title">全部域名</h2>

                    <div class="box-tools">
                        <div class="input-group input-group-sm" style="width: 300px;">
                            <input type="text" name="domain_search" class="form-control pull-right" placeholder="Search">
                            <span class="glyphicon glyphicon-remove"
                                  name="clear-previous-input" disabled
                                  style="position:absolute; top:10px; right:45px; z-index:10; caret-color:transparent"></span>
                            <div class="input-group-btn">
                                <button type="submit" name="domain_search_submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.box-header -->

                <div id="domain_box">
                    {% include "bind/tmp/domain_table_tmp.html" %}
                </div>
                <!-- /.box-body -->
            </div>
            <!-- /.box -->
        </div>


    </div>

{% endblock %}